home *** CD-ROM | disk | FTP | other *** search
/ Game.EXE 2004 August / My Disc.iso / games / demo / Rapid gunner / RG_Setup.exe / common / image_Reverse.fx < prev    next >
Encoding:
Text File  |  2004-04-21  |  1.2 KB  |  41 lines

  1. // LF2 Engine
  2. // (C) 2002-3 7FX
  3. //---------------------------------------------------------------------------
  4. // Desc
  5. string desc : Description = "Image shader, ktery meni zobrazeni na zrcadlove v x.";
  6. // Shader type phase
  7. string type : Type = "image";
  8. //---------------------------------------------------------------------------
  9. // Render target texture
  10. texture RT : RenderTargetFSMap;
  11. //---------------------------------------------------------------------------
  12. sampler sRT = sampler_state
  13. {
  14.     Texture = <RT>;
  15.     MinFilter = LINEAR;
  16.     MagFilter = LINEAR;
  17.     AddressU = CLAMP;
  18.     AddressV = CLAMP;
  19. };
  20. //---------------------------------------------------------------------------
  21. // Pixel shader
  22. float4 PS(float2 uv: TEXCOORD0) : COLOR
  23. {
  24.     float2 texCoord = uv;
  25.     texCoord.x = 1.0 - texCoord.x;
  26.     return tex2D(sRT, texCoord);
  27. }
  28.  
  29. //---------------------------------------------------------------------------
  30. // Technique with vertex and pixel shader
  31. technique vs11_ps14
  32. {
  33.     pass p0
  34.     {
  35.            ZEnable = false;
  36.         ZWriteEnable = false;
  37.    
  38.         PixelShader  = compile ps_1_4 PS();
  39.     }
  40. }
  41. //---------------------------------------------------------------------------